home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 050a / ed21.zip / ED.DOC next >
Text File  |  1993-03-07  |  16KB  |  401 lines

  1.  
  2.                                ED 2.1
  3.  
  4.                           Full-screen Editor
  5.  
  6.                                   by
  7.  
  8.                                Bob Eyer
  9.                              [73230,2620]
  10.  
  11.                              Mar 7, 1993
  12.  
  13.  
  14.      Note: See  Rationale  section  at  the bottom of the text, and the
  15.            enclosed SHARE.TXT file, showing how you can  obtain  copies
  16.            of my other work.
  17.  
  18.  
  19.      Syntax
  20.      ------
  21.  
  22.      ED Filespec [/rows]
  23.  
  24.      Environment
  25.      -----------
  26.      SET ED=xC
  27.       x: color index number
  28.       C: accept external cursor default
  29.  
  30.      F8 key quits
  31.  
  32.  
  33.      Definitions
  34.      -----------
  35.      Filespec       A text file  or wildcard  specifying one or a range
  36.                     of text files.   ED  recognises  all  standard  DOS
  37.                     shortcuts, such as
  38.  
  39.                     ED .  or  ED ..\.
  40.  
  41.                     meaning
  42.  
  43.                     ED *.*  or ED ..\*.*
  44.  
  45.                     or
  46.  
  47.                     ED SYS
  48.  
  49.                     meaning
  50.  
  51.                     ED \SYS\*.*
  52.  
  53.                     ED  accepts  files which have either only the reset
  54.                     attribute or only the archive attribute; all  other
  55.                     combinations  of  attributes  will abort processing
  56.                     with the message "Wrong attribute(s)".
  57.  
  58.                     Selection of a wildcard  causes  ED  to  present  a
  59.                     "select"  window  in  the status line; if you don't
  60.                     like the selection, just hit the F8 key and enter a
  61.                     new wildcard.  Entering a  new  wildcard  does  not
  62.                     erase   the  old  one;  Filespec  is  a  CUMULATIVE
  63.                     wildcard  handler.   (See  discussion   of   Ctrl-N
  64.                     below).
  65.  
  66.                     You  may  move  through  the  resulting  cumulative
  67.                     selection list by using your Up and Dn cursors.
  68.  
  69.                     A  filespec  should   not   be   longer   than   40
  70.                     characters.    ED   allocates  40  bytes  for  each
  71.                     complete filename and allows for a maximum  of  640
  72.                     filenames.
  73.  
  74.      rows           The maximum  number  of  lines  of  video  display.
  75.                     If not given or if set to *, ED will detect whether
  76.                     the  screen is in 25, 43, or 50 line mode.  If your
  77.                     monitor does not support 43 or 50  line  mode,  the
  78.                     routine defaults to 25 lines.
  79.  
  80.                     If the status line does not appear at the bottom of
  81.                     your  screen,  the detection routine is not working
  82.                     for  your  monitor  and  manual  override  will  be
  83.                     necessary.
  84.  
  85.                     The  *  entry for rows makes it possible to put the
  86.                     ED  command  line  in   a   batch   file,   without
  87.                     prejudicing  the  question whether your video is in
  88.                     43 or 50 line mode.
  89.  
  90.                     ED does not support 132-column modes.
  91.  
  92.  
  93.      If no parameter is entered on the command  line,  ED  will  simply
  94.      return a simple help screen.
  95.  
  96.  
  97.      Environment
  98.      -----------
  99.      ED sets color and cursor default via the environment.  The general
  100.      syntax is -
  101.  
  102.      SET ED=xC
  103.  
  104.      where x is a color number.  See Colour section below.
  105.  
  106.      If x is not set, the program defaults to 27 (bright cyan on blue).
  107.  
  108.      If  C is added to the ED environment string, ED preserves whatever
  109.      cursor shape was present  prior  to  loading  the  program.   This
  110.      feature  is  useful  primarily to users of block cursors (see CFIX
  111.      program in my SUTL package).  If C is not added to the environment
  112.      string, ED takes action to  define  the  cursor  size  to  be  the
  113.      standard double bottom line.
  114.  
  115.      Example:
  116.  
  117.      SET ED=48C
  118.  
  119.      This string sets ED's colour to be black on cyan background so  as
  120.      to  accept  any  externally defined default for cursor size.  'SET
  121.      ED=48' forces the cursor to be standard.
  122.  
  123.      To remove ED from the environment, use the DOS command
  124.  
  125.      SET ED=
  126.  
  127.      Changes
  128.      -------
  129.      2.1  - Advertising screen shifted to avoid flash on single
  130.             element wildcard loads.
  131.  
  132.           - Initial position of wildcard array shifted to agree with
  133.             first element in each new series.
  134.  
  135.           - Standard column feature limited to first 40 positions of
  136.             each line.
  137.  
  138.           - Cursor shape control added to environment (see above).
  139.  
  140.  
  141.      Full Screen Edit
  142.      ----------------
  143.      The  following  is  a  table  showing  the  meaning  of ED's edit
  144.      control   keys.
  145.  
  146.         Key          Meaning
  147.         ------       --------------------------------------------------
  148.         F8           Exit without saving data.
  149.                       The  universal  quit  function was assigned to F8
  150.                       largely as an alternative to using the  Esc  key.
  151.                       The  chief  advantage  of  not  giving functional
  152.                       meaning to the Esc key is to permit the editor to
  153.                       receive    ANSI    escape    sequences    without
  154.                       misinterpreting them.
  155.  
  156.      *  Ctrl-Z       Exit saving data to file.
  157.                       This one is the  'hard  save';  that  is,  Ctrl-Z
  158.                       writes  the  file back to disk regardless whether
  159.                       it was changed in the  editor  (an  unconditional
  160.                       save).
  161.  
  162.      *  Ctrl-N       Load new file or select from a wildcard of files.
  163.                       Will save data to old  file  before  loading  new
  164.                       file, only if there was any attempt to change old
  165.                       data (soft save).
  166.  
  167.                       In  addition, this function does not wipe out the
  168.                       old wildcard previously in  memory;  instead,  it
  169.                       simply  adds  the new wildcard information to the
  170.                       old.  This makes it possible to obtain  full  use
  171.                       of  the  Select  function  F9 in situations where
  172.                       more than one wildcard is needed,  or  where  the
  173.                       files  needed in the Select array are not related
  174.                       to one another by wildcard definition.
  175.  
  176.      *  F9           Present old file list for new select.
  177.                       As does Ctrl-N, this will save data to  old  file
  178.                       before loading any new file, only if the old data
  179.                       were changed (soft save).
  180.  
  181.                      To inject new wildcard, use Ctrl-N.
  182.  
  183.      *  Ctrl-W       Periodically save data during session (AUTO-SAVE).
  184.                       When  activated,  ED automatically saves all data
  185.                       once every three  minutes  on  any  line  change,
  186.                       provided that the file is changed (soft save).
  187.  
  188.         Ctrl-D       Delete current line and put it in the delete
  189.                       buffer.
  190.  
  191.         Ctrl-Y       Insert delete buffer at current line.
  192.  
  193.         Ctrl-L       Insert blank line.
  194.  
  195.         Ctrl-O       Toggle word-wrap status.
  196.                       Default is to enable word-wrap.
  197.  
  198.         Ctrl-I       Set right margin for word-wrap.
  199.                       Default is column 71.  To set, simply move cursor
  200.                       to desired column and then hit Ctrl-I.
  201.  
  202.                       In the event word-wrap is turned off temporarily,
  203.                       ED remembers the previous  right  margin  setting
  204.                       for new Ctrl-O toggle.
  205.  
  206.         F1           Mark first line for cut and paste operations.
  207.                       This function also clears the paste buffer.
  208.  
  209.         F2           Mark last line for cut and paste operations.
  210.                       This  function  also copies all lines between the
  211.                       first and last lines  inclusive  into  the  paste
  212.                       buffer.
  213.  
  214.                       The copy function will not  work  at  all,  where
  215.                       either  the  number of lines to be copied exceeds
  216.                       500 or the number of lines copied plus the number
  217.                       of lines in the file  exceeds  the  RAM  handling
  218.                       capacity  of  the  program (generally, as much as
  219.                       5000-6000 lines).
  220.  
  221.         F3           Cut all text between  the  first  and  last  lines
  222.                      marked, inclusive.
  223.                       The  cut  affects  only  lines to be saved to the
  224.                       input file, not  the  paste  buffer.   Therefore,
  225.                       after  marking  the  desired text with F1 and F2,
  226.                       the user may proceed to cut  and  then  paste  at
  227.                       his desired location.
  228.  
  229.         F4           Paste  all  text  between the first and last lines
  230.                      marked  inclusive  into  current  document  at the
  231.                      position of the cursor.
  232.                       This function can be executed any number of times
  233.                       up  to  available RAM capacity, since ED does not
  234.                       clear the paste buffer except on use  of  the  F1
  235.                       key.
  236.  
  237.         F5           Prompt  for search string, then search from top of
  238.                      file to find first occurrence.  (case insensitive)
  239.  
  240.         F6           Continue to search  for  next  occurrence.
  241.                       After  last  match,  returns  to  prompt  for new
  242.                       search string (uses  previous  search  string  as
  243.                       default   if   none   is   selected).   Since  F6
  244.                       automatically returns to the F5  function  (which
  245.                       begins  searches from the top of the file), there
  246.                       is no need for a reverse search string function.
  247.  
  248.         F7           Split text from cursor to next line.
  249.  
  250.         Up           Previous line.
  251.  
  252.         PgUp         Previous page.
  253.  
  254.         Ctrl-PgUp    Top of file.
  255.  
  256.         Dn           Next line.
  257.  
  258.         PgDn         Next page.
  259.  
  260.         Ctrl-PgDn    Bottom of file.
  261.  
  262.         Right        Move right 1 character.
  263.  
  264.         Left         Move left 1 character.
  265.  
  266.         Tab          Move right 10 characters.
  267.                       Beyond right margin, cursor flips to column 1.
  268.                       [tab stops: 1, 10, 20, 30, 40, 50, 60, 70, 80]
  269.  
  270.         Home         Move cursor to column 1.
  271.  
  272.         End          Move cursor to end of current line.
  273.  
  274.         Ins          Insert mode on/off (default is off)
  275.  
  276.         Backspace    Move left all text right of cursor including
  277.                       cursor ("destructive backspace").
  278.  
  279.         Del          Delete character at cursor position moving
  280.                       remaining characters one position to the left.
  281.  
  282.  
  283.      If you don't wish ED to alter your data file in any  way,  do  not
  284.      use  the  functions  which  are  asterisked  in  the  table above.
  285.  
  286.      Status Line
  287.      -----------
  288.      The status line presents the following data  in  order:  the  file
  289.      name, current line number, column number, insert status, word-wrap
  290.      status,  and  the  system time.  The remainder of the line is used
  291.      for warnings, reminders and transient status messages, such as how
  292.      many lines are in the paste buffer (if any).
  293.  
  294.      Following the Status Line are two lines  of  help,  covering  only
  295.      those keys that may be difficult to remember.
  296.  
  297.      File i/o
  298.      --------
  299.      ED is programmed to suppress the cursor when loading or updating a
  300.      file.
  301.  
  302.      At runtime, ED displays the message
  303.  
  304.      WARNING: File overflow
  305.  
  306.      if the file selected contains more than the line limit or
  307.  
  308.      WARNING: Line xyz truncated
  309.  
  310.      if the file contains line(s), the first of which xyz, truncated to
  311.      80 characters in RAM.  In either case, ED beeps 3  times  to  draw
  312.      attention  to  the  danger.  The correct exit to use is via the F8
  313.      key, NOT Ctrl-Z or any soft save.
  314.  
  315.      If you save a file which raises either message on the status line,
  316.      the file will be damaged, unless you quit via F8.
  317.  
  318.      Otherwise, where the load is normal, ED displays the message
  319.  
  320.      ^W auto-save
  321.  
  322.      If  you  intend to do any file editing at all, you should activate
  323.      auto-save directly you have the file on screen by hitting  Ctrl-W,
  324.      causing the reminder to be replaced by the message
  325.  
  326.      AUTO-SAVE ON
  327.  
  328.      In the event of an accident you  will  then  lose  at  most  three
  329.      minutes of data changes.
  330.  
  331.      If  no  line  is  changed  when  auto-save  or any other soft save
  332.      function is invoked by  ED,  no  disk  write  will  actually  take
  333.      place.   A  disk  write will always take place, however, on use of
  334.      the hard-save Ctrl-Z function.
  335.  
  336.      Whenever a disk write takes place ED beeps the speaker once.
  337.  
  338.      Free memory
  339.      -----------
  340.      ED allocates all available RAM for itself and the file  it  loads,
  341.      and  requires  a  minimum  of  about  140k  free.  If that much is
  342.      unavailable, ED will terminate with a message  about  insufficient
  343.      memory.
  344.  
  345.      Colour
  346.      ------
  347.      ED's color default is 27.  But you can  change  it  by  using  the
  348.      table below (see Environment discussion above).
  349.  
  350.                   Back     Fore   Bright Fore
  351.                   ----     ----   -----------
  352.      Black           0        0    8
  353.      Blue           16        1    9
  354.      Green          32        2   10
  355.      Cyan           48        3   11
  356.      Red            64        4   12
  357.      Magenta        80        5   13
  358.      Brown          96        6   14
  359.      White         112        7   15
  360.  
  361.  
  362.      The correct number is found merely by adding the Foreground to the
  363.      Background desired.  For example, Bright Green on Blue  background
  364.      is 10 + 16 = 26.
  365.  
  366.      Avoid  settings  above  127.  Values above that limit will produce
  367.      blinking displays.
  368.  
  369.      In my estimation the numbers best for the eye are 10, 11, 14,  15,
  370.      26,  27,  30,  31, 74, 75, 78, 79 and 112.  But you may have other
  371.      ideas.
  372.  
  373.      Rationale
  374.      ---------
  375.      I  wrote  this  editor  originally  as  an  extract  from  ADL, my
  376.      phone-canvassing program (See SHARE.TXT for details).
  377.  
  378.      However, it  remains  a  useful  small  editor,  especially  as  a
  379.      replacement  for  EDLIN.   There  are  a number of competing small
  380.      editors, such as Wilmott's SLED.  But few of  them  have  all  the
  381.      features  I  wanted.
  382.  
  383.      ED begins to  set  a  new  baseline  in  small  editors.   It  has
  384.      sophisticated  wildcard  support,  allowing  even  those files not
  385.      related by wildcard to be stored in the Select buffer,  so  as  to
  386.      make  it  a simple matter to switch among many files (see F9 key).
  387.      It also has color and screen resolution  support,  and  it  has  a
  388.      feature  which  I  have  always  wanted  in  an  editor: automatic
  389.      periodic saves.  A big problem with existing editors  is  loss  of
  390.      data  on power down or other unanticipated events.  ED's auto-save
  391.      feature solves most of this problem.
  392.  
  393.      The  most  important  features  which ED lacks are (1) handling of
  394.      lines  longer  than  80   characters   and   (2)   word-wrap   and
  395.      right-justified paragraph formatting.
  396.  
  397.      These issues are high on my agenda for the next version.
  398.  
  399.      -------------------------
  400.      End of documentation
  401.